/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MancalaGameBoardGUI.java
 *
 * Created on Mar 21, 2013, 2:04:54 PM
 */
package mancala;

/**
 *
 * @author mrich
 */
public class MancalaGameBoardGUI extends javax.swing.JFrame {

    /** Creates new form MancalaGameBoardGUI */
    public MancalaGameBoardGUI() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        player1pit = new javax.swing.JButton();
        player2pit = new javax.swing.JButton();
        player2hole7 = new javax.swing.JButton();
        player1hole1 = new javax.swing.JButton();
        player1hole2 = new javax.swing.JButton();
        player2hole6 = new javax.swing.JButton();
        player2hole5 = new javax.swing.JButton();
        player1hole3 = new javax.swing.JButton();
        player2hole4 = new javax.swing.JButton();
        player1hole4 = new javax.swing.JButton();
        player2hole3 = new javax.swing.JButton();
        player1hole5 = new javax.swing.JButton();
        player2hole2 = new javax.swing.JButton();
        player1hole6 = new javax.swing.JButton();
        player2hole1 = new javax.swing.JButton();
        player1hole7 = new javax.swing.JButton();
        gameboardexit = new javax.swing.JButton();
        gameboardrestart = new javax.swing.JButton();
        boardtitle = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Mancala Game");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setName("MancalaBoard"); // NOI18N
        setResizable(false);

        player1pit.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player1pit.setText("0");
        player1pit.setEnabled(false);

        player2pit.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player2pit.setText("0");
        player2pit.setEnabled(false);

        player2hole7.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player2hole7.setText("0");
        player2hole7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                player2hole7ActionPerformed(evt);
            }
        });

        player1hole1.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player1hole1.setText("0");

        player1hole2.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player1hole2.setText("0");

        player2hole6.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player2hole6.setText("0");
        player2hole6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                player2hole6ActionPerformed(evt);
            }
        });

        player2hole5.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player2hole5.setText("0");

        player1hole3.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player1hole3.setText("0");
        player1hole3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                player1hole3ActionPerformed(evt);
            }
        });

        player2hole4.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player2hole4.setText("0");

        player1hole4.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player1hole4.setText("0");

        player2hole3.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player2hole3.setText("0");

        player1hole5.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player1hole5.setText("0");

        player2hole2.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player2hole2.setText("0");

        player1hole6.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player1hole6.setText("0");

        player2hole1.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player2hole1.setText("0");

        player1hole7.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        player1hole7.setText("0");

        gameboardexit.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        gameboardexit.setText("Exit");
        gameboardexit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gameboardexitActionPerformed(evt);
            }
        });

        gameboardrestart.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
        gameboardrestart.setText("Restart");

        boardtitle.setFont(new java.awt.Font("Times New Roman", 1, 36)); // NOI18N
        boardtitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        boardtitle.setText("Mancala");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(boardtitle, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(player1pit, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(player2hole7, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(player1hole1, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(player2hole6, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(player1hole2, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(player2hole5, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(player1hole3, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(player2hole4, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(player1hole4, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(player2hole3, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(player1hole5, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(player2hole2, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(player1hole6, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(gameboardrestart)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 116, Short.MAX_VALUE)
                        .addComponent(gameboardexit))
                    .addComponent(player2pit, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(player2hole1, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(player1hole7, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(boardtitle, javax.swing.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(player1pit, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(player2hole7, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(player1hole1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(player1hole2, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(player2hole6, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(player2hole5, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(player1hole3, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(player2hole4, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(player1hole4, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(player2hole3, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(player1hole5, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(player2hole2, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(player1hole6, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(player2hole1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(player1hole7, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(player2pit, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(gameboardexit)
                    .addComponent(gameboardrestart))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void gameboardexitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gameboardexitActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_gameboardexitActionPerformed

    private void player1hole3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_player1hole3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_player1hole3ActionPerformed

    private void player2hole7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_player2hole7ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_player2hole7ActionPerformed

    private void player2hole6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_player2hole6ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_player2hole6ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new MancalaGameBoardGUI().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel boardtitle;
    private javax.swing.JButton gameboardexit;
    private javax.swing.JButton gameboardrestart;
    private javax.swing.JButton player1hole1;
    private javax.swing.JButton player1hole2;
    private javax.swing.JButton player1hole3;
    private javax.swing.JButton player1hole4;
    private javax.swing.JButton player1hole5;
    private javax.swing.JButton player1hole6;
    private javax.swing.JButton player1hole7;
    private javax.swing.JButton player1pit;
    private javax.swing.JButton player2hole1;
    private javax.swing.JButton player2hole2;
    private javax.swing.JButton player2hole3;
    private javax.swing.JButton player2hole4;
    private javax.swing.JButton player2hole5;
    private javax.swing.JButton player2hole6;
    private javax.swing.JButton player2hole7;
    private javax.swing.JButton player2pit;
    // End of variables declaration//GEN-END:variables
}
